'use strict';
/*将一个数组赋值给多个变量
var arr = {a,b,c,d,e}

var x = arr[0]
var y = arr[1]
var z = arr[2]
也可以同时给多个变量赋值
var [a,b,c] = ['1','2','3']
*/
//对一个对象进行解构赋值

var person = {
    name: '小明',
    age: 20,
    gender: 'male',
    passport: 'G-12345678',
    school: 'No.4 middle school'
};
//var {name, age, passport} = person;
// name, age, passport分别被赋值为对应属性:
console.log(name);